package ReaderAndWriter;

import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class CopyJavaDemo2 {
    public static void main(String[] args) throws IOException {

        FileReader fr = new FileReader("funCode\\funCode.iml");
        FileWriter fw = new FileWriter("funCode\\funCopy.iml");


        char[] chars = new char[1024];
        int len;
        while ((len = fr.read(chars)) != -1) {
            fw.write(chars,0,len);
        }

        fr.close();
        fw.close();
    }
}
